classDiagram
    class AbstractFactory {
        <<interface>>
        +createProduct(): AbstractProduct
    }
    class ConcreteFactoryA {
        +createProduct(): ConcreteProductA
    }
    class ConcreteFactoryB {
        +createProduct(): ConcreteProductB
    }
    class AbstractProduct {
        <<interface>>
        +use(): void
    }
    class ConcreteProductA {
        +use(): void
    }
    class ConcreteProductB {
        +use(): void
    }

    AbstractFactory <|-- ConcreteFactoryA
    AbstractFactory <|-- ConcreteFactoryB
    AbstractProduct <|-- ConcreteProductA
    AbstractProduct <|-- ConcreteProductB
    ConcreteFactoryA ..> AbstractProduct : Creates
    ConcreteFactoryB ..> AbstractProduct : Creates
